<meta content="telephone=no" name="format-detection" />
<title>{$sys_name} - {$lang.tjjg}</title>
<!DOCTYPE html>
<html>

<!-- Mirrored from www.zi-han.net/theme/hplus/tree_view.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:58 GMT -->
<head>

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <link rel="shortcut icon" href="favicon.ico">

    <!-- Bootstrap -->
    <link href="/css/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/css/reset.css" rel="stylesheet">
    <link href="/css/css/style.css" rel="stylesheet">
    <script src="/js/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="/js/js/respond.js" type="text/javascript"></script>
    <script src="/js/js/common.js" type="text/javascript"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body class="bg">
<include file="Public/Home/Pubheader.html" />
<section class="wrapper" style="padding: 0">
    <!--左侧导航-->
    <include file="Public/Home/Menu.html" />
    <div class="content-area">
        <div class="t80"></div>
        <div class="z_top">
            <div class="location">
                <img src="images/location.png" alt="">
                <span>{$lang.ur_here}：{$lang.tjjg}</span>
            </div>
        </div>
        <div class="content">
            <div class="tjrs">
                <div class="jg_title">
                    <p class="jg_text"> {$lang.dqtjrs}：{$child_num} </p>
                    <form action="{:U('User/tjjg')}" method="post">
                        <p class="zj2_date">
                            <input type="text" name="username" placeholder="{$lang.hyyhm}" value="{$keyword}" class="form_input">
                        </p>
                        <p class="zj2_btn">
                            <input type="submit" class="btn_zj" value="">
                        </p>
                    </form>
                </div>
            </div>

            <div class="fx_tab" style="margin-top: 10px;background: none">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content" style="background-size: 100% 100%;background: none;padding: 0">
                            <div id="treeview1" class="test">
                                <ul class='list-group'>
                                    <input type="hidden" id="userid" value="{$uid}">
                                    <if condition="$parent">
                                    <foreach name='parent' item='item'>
                                        <li class='list-group-item' id='parent_{$item.id}' style="margin-top: 10px;">
                                            <span class='icon' id="span_{$item.id}" onclick='show_child({$item.id})'><i><span  <if condition='$item.has eq  1'> class='view' <else/> class='view1' </if> id='badge_{$item.id}' >+</span></i></span>
                                            {$item.username}
                                            <span id='add_ul_{$item.id}'></span>
                                        </li>
                                    </foreach>
                                        <else/>
                                        <div style="padding: 10px"> {$lang.nouser}!</div>
                                    </if>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>




</section>
    <style>
        .tjrs{
            width: 100%;background: url(/images/main_bg.png) bottom no-repeat;line-height: 45px;margin-top: 10px;padding-left: 10px;color:#fff;font-size: 16px
        }
        .list-group{
            margin-bottom: 0;
        }
        .view{
            width: 20px;
            height: 18px;
            border: 1px solid;
            position: relative;
            display: inline-table;
            text-align: center;
            line-height: 18px;
            background: #0dae8d;
            color: #fff;
        }
        .view1{
            width: 20px;
            height: 18px;
            border: 1px solid;
            position: relative;
            display: inline-table;
            text-align: center;
            line-height: 18px;
            background: #ddd;
            color: #fff;
        }
    </style>
    <script type="text/javascript">
        //var left = 40;
        show_child($("#userid").val())
        function show_child(child){
                $.ajax({
                    type:"GET",
                    url:"{:U('User/tjjg')}",
                    data:{parent:child},
                    dataType: "json",
                    success:function(data){
                        var html_start = "<ul class='list-group' style=''>" ;
                        var content = "";
                        for(var i=0;i<data.length;i++){
                            if(data[i].has == 1){
                                var view = 'view'
                            }else{
                                var view = 'view1'
                            }  //style='padding-left: "+left+"px'
                            content +=  "<li class='list-group-item' style='margin-top: 10px;' id='parent_"+ data[i].id +"'"+ "><span class='icon' id = 'span_"+ data[i].id +"'" +" onclick='show_child(" + data[i].id + ")'><i><span  class="+view+" id='badge_"+ data[i].id + "'"+">+</span></i></span>"+data[i].username +" <span id='add_ul_" + data[i].id+ "'"+"></span></li>" ;
                        }
                        var html_end = " </ul>";
                        var html = html_start + content + html_end
                        $("#add_ul_"+child).html(html)
                        show = child;
                        //left = left +40
                    }
                });
            $("#span_"+child).removeAttr("onclick");
            $("#span_"+child).attr("onclick","hide_child("+child+")");
            $("#badge_"+child).html("-")
            }
        function hide_child(child){
            $("#add_ul_"+child).html("");
            $("#span_"+child).removeAttr("onclick");
            $("#span_"+child).attr("onclick","show_child("+child+")");
            $("#badge_"+child).html("+")
        }

    </script>
<script type="text/javascript" language="javascript">
    var nav1 = document.getElementById("nav1");
    var links1 = nav1.getElementsByTagName("li");
    var lilen1 = nav1.getElementsByTagName("a");
    var currenturl1 = document.location.href;
    var last1 = 0;
    for (var i1=0;i1<links1.length;i1++)
    {
        var linkurl1 = lilen1[i1].getAttribute("href");
        if(currenturl1.indexOf(linkurl1)!=-1)
        {
            last1 = i1;
        }
    }

    links1[last1].className = "cur1";

</script>
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/js/content.min.js?v=1.0.0"></script>
    <!--script src="js/plugins/treeview/bootstrap-treeview.js"></script-->
    <!--<script src="js/demo/treeview-demo.min.js"></script>-->
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>

</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/tree_view.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:59 GMT -->
</html>
